/*-----------------------------------------------------------------------------------

 	Custom JS - All front-end jQuery
 
-----------------------------------------------------------------------------------*/
 
jQuery(document).ready(function() {	
	    	
	jQuery('div.tabs').tabs('div.content', 
		{
			tabs: '.tab_names > a',
			initialIndex : 0		
		}
	);
	
	jQuery('div.accordion').tabs('div.accordion_item > div.accordion_content', {
		tabs: '.accordion_title > a',
		effect : 'slide',
		currentClose: true
		, initialIndex : 0
	});
	
	/* Alert Close */
	jQuery('.alert-close').on('click',function(){
		jQuery(this).parent().animate({opacity: 0}, 300, function(){
			jQuery(this).slideUp('slow', function(){
				jQuery(this).remove();
			});
		});
	});
	
	/* Back to top */
	jQuery('span.backtop a').click(function(e) {
		e.preventDefault();
		jQuery('body,html').animate({
		scrollTop: 0}, 1200);
	});
	
	/* Initialize Flexslider */
	jQuery('.flexslider').flexslider({
        animation: "fade",
        direction: "horizontal",
        slideshowSpeed: 7000,
        animationSpeed: 600,
        useCSS: false
    });
    
			
}); // END OF DOCUMENT


	/* Jquery Masonry */
	jQuery( document ).ready( function( j ) {
		var $container = j('.masonry-post-list');
		$container.imagesLoaded( function() {
			$container.masonry( { itemSelector: '.masonry-post' } );
		});
	});




